import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 26727
 * Date: 2024-05-09
 * Time: 8:28
 */
/*class Person implements Comparable<Person>{
    public String name;
    public String gender;
    public int age;

    Person(String name,String gender, int age) {
        this.name = name;
        this.gender = gender;
        this.age = age;
    }

    public String toString() {
        return "[" + this.name + ":" + this.gender + " "+ this.age + "]";
    }

    public int compareTo(Person o) {
        return this.age - o.age;
    }

}
public class Test1 {
    public static void main(String[] args) {
        Person[] person = new Person[] {
                new Person("泡泡","女",19),
                new Person("西西","男",33),
                new Person("柚柚","女",25),
                new Person("球球","男",25)
        };
        System.out.println(person[0].compareTo(person[1]));
        Arrays.sort(person);
        System.out.println(Arrays.toString(person));

    }
}
*/